# -*- mode: snippet -*-
# name: list subdirs with os.listdir
# key: list_subdirs_listdir@os
# contributor: Shuguang Sun
# --
def ${1:lssubdirs}(path):
    for file in os.listdir(path):
        if os.path.isdir(os.path.join(path, file)):
            yield file

for file in $1("."):
    print(file)
